Skip to content

Conversation

@ArifRoktim
Copy link
Contributor

This closes #6305.

@ArifRoktim
Copy link
Contributor Author

Realized that the following doesn't work as expected:

#[allow(non_camel_case_types)]
pub struct FOO_BAR;
[rust-analyzer] [H] Structure `FOO_BAR` should have CamelCase name, e.g. `FooBar`

I don't know how long it'll take to fix that, so feel free to merge away.

@popzxc
Copy link
Contributor

popzxc commented Oct 22, 2020

Yeah, that was discussed here: #6130 (comment)

TL;DR rust analyzer doesn't currently collect information about attributes applied to items. This is indeed a complex task due to variety of places where allow attribute may appear, so for now it is expected that users who don't want rust analyzer to complain will just disable this diagnostic selectively.

The PR itself LGTM.

@matklad
Copy link
Contributor

matklad commented Oct 22, 2020

bors r=popzxc

@bors
Copy link
Contributor

bors bot commented Oct 22, 2020

@bors bors bot merged commit 31db677 into rust-lang:master Oct 22, 2020
@ArifRoktim ArifRoktim mentioned this pull request Oct 24, 2020
@ArifRoktim ArifRoktim deleted the wrong-case branch November 4, 2020 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The IncorrectCase diagnostic is overzealous for types that should be Camel Cased

4 participants